//任何一个窗口的关闭按钮(返回)
import java.awt.event.*;
import javax.swing.*;
public class AllWinClose_button implements ActionListener {
    JFrame win;
    AllWinClose_button(JFrame win){
        this.win = win;
    }
    public void actionPerformed(ActionEvent e) {
        win.dispose();
    }
}